package br.com.monise.util;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class FactoryUtil {

	 private static EntityManagerFactory emf;

     public static EntityManager getEntityManager() {

             if (emf == null){
                  emf = Persistence.createEntityManagerFactory("aprendiz");
             }
             return emf.createEntityManager();
     }
}
